<?php
/*
 * @Author: lokei
 * @Date: 2022-09-28 20:55:13
 * @LastEditors: lokei
 * @LastEditTime: 2022-10-24 15:13:46
 * @Description: 
 */
$router->group(['prefix' => env('ROUTER_PREFIX') . 'api'], function () use ($router) {
	
	/**Store商家门店 */
	// 商家门店
	$router->group(['prefix' => 'store', 'middleware' => 'auth'], function () use ($router) {
		// 商家门店统计数据
		$router->get('ofMe', [
			'as' => 'storeOfMe', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@ofMe'
		]);
		$router->get('roleOfMe', [
			'as' => 'storeRoleOfMe', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@roleOfMe'
		]);
		
	});

	$router->group(['prefix' => 'store'], function () use ($router) {
		// 商家门店统计数据
		$router->get('statistic/all', [
			'as' => 'storeStatisticAll', 'uses' => '\App\Http\Controllers\Store\Statistic\StatisticController@all'
		]);
		
		// 商家门店管理
		$router->get('list', [
			'as' => 'storeList', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@list'
		]);
		$router->get('ofIds', [
			'as' => 'storeOfIds', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@ofIds'
		]);
		$router->get('get', [
			'as' => 'getStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@get'
		]);
		// 门店客服电话
		$router->get('contacts/getMobile', [
			'as' => 'getStoreContacts', 'uses' => '\App\Http\Controllers\Store\Contacts\ContactsController@getMobile'
		]);
		$router->post('create', [
			'as' => 'createStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@create'
		]);
		$router->post('update', [
			'as' => 'updateStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@update'
		]);
		$router->post('delete', [
			'as' => 'deleteStore', 'uses' => '\App\Http\Controllers\Store\Store\StoreController@delete'
		]);
		$router->post('auth/bindUser', [
			'as' => 'bindUserForStore', 'uses' => '\App\Http\Controllers\Store\Auth\AuthController@bindUser'
		]);
		
		// 商家门店标签分类
		$router->get('tag/ofStore', [
			'as' => 'getStoreTag', 'uses' => '\App\Http\Controllers\Store\Tag\TagController@ofStore'
		]);
		$router->post('tag/set', [
			'as' => 'setStoreTag', 'uses' => '\App\Http\Controllers\Store\Tag\TagController@set'
		]);
		$router->get('type/ofStore', [
			'as' => 'getStoreType', 'uses' => '\App\Http\Controllers\Store\Type\TypeController@ofStore'
		]);
		$router->post('type/set', [
			'as' => 'setStoreType', 'uses' => '\App\Http\Controllers\Store\Type\TypeController@set'
		]);

		
		// 商家门店设置
		$router->get('conf/get', [
			'as' => 'getStoreConf', 'uses' => '\App\Http\Controllers\Store\Conf\ConfController@get'
		]);
		$router->post('conf/update', [
			'as' => 'updateStoreConf', 'uses' => '\App\Http\Controllers\Store\Conf\ConfController@update'
		]);
		
		// 商家门店银行卡
		$router->get('bank/get', [
			'as' => 'getStoreBank', 'uses' => '\App\Http\Controllers\Store\Bank\BankController@get'
		]);
		$router->post('bank/update', [
			'as' => 'updateStoreBank', 'uses' => '\App\Http\Controllers\Store\Bank\BankController@update'
		]);
	});
	
});
